local yiwangerping = fk.CreateSkill{
    name = "rmt__yiwangerping",
}
Fk:loadTranslationTable{
    ["rmt__yiwangerping"] = "一往而平",
    [":rmt__yiwangerping"] = "摸牌阶段，你可以改为令所有其他角色将手牌数调整至与你相同。",
    ["#rmt__yiwangerping"] = "是否发动 一往而平，将此阶段改成令所有其他角色将手牌数调整至与你相同（%arg）",
}

yiwangerping:addEffect(fk.EventPhaseStart,{
    anim_type = "control",
    can_trigger = function (self, event, target, player, data)
        return player:hasSkill(yiwangerping.name) and target == player and player.phase == Player.Draw
    end,
    on_cost = function (self, event, target, player, data)
        if player.room:askToSkillInvoke(player,{
            skill_name = yiwangerping.name,
            prompt = "#rmt__yiwangerping:::"..player:getHandcardNum()
        }) then
            return true
        end
    end,
    on_use = function (self, event, target, player, data)
        local room = player.room
        for _, cp in ipairs(room:getOtherPlayers(player)) do
            local num = player:getHandcardNum()
            if num > cp:getHandcardNum() then
                cp:drawCards(num - cp:getHandcardNum(),yiwangerping.name)
            elseif num < cp:getHandcardNum() then
                room:askToDiscard(cp,{
                    max_num = cp:getHandcardNum()-num,
                    min_num = cp:getHandcardNum()-num,
                    cancelable = false,
                    skill_name = yiwangerping.name,
                    include_equip = false,
                })
            end
        end
        return true
    end,
})

return yiwangerping